﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class ExercisesUsage
{
    public static void Main()
    {
        //BufferedConsole console = new BufferedConsole(6,"console 1");
        //console.Write("1234567890abcd");
        //console.Write("1234567890xyz");

        //BufferedConsole console2 = new BufferedConsole(5, "console 2");
        //using (console2)
        //{
        //    console2.Write("1234567890abcd");
        //    console2.Write("1234567890xyz");
        //}

        Pool testPool = new Pool();
        Resource first = testPool.GetAvailableResource();
       //using (first)
       //{
            Console.WriteLine(first);
       //}
        first = null;

        Resource second = testPool.GetAvailableResource();
        Console.WriteLine(second);
    }
}

